
# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo12
# Description:
# Author:       98745
# Date:         2019/3/15
#-------------------------------------------------------------------------------

import pandas
s=pandas.read_csv('scientists.csv')
print(s[s['Age']>s['Age'].mean()])
print('------------')
print(s.loc[[True,True,False,True]])
print('----------')
print(s.iloc[[1,3,4]])
print('-----------')
print(s[['Name','Age','Occupation']][s['Age']>s['Age'].mean()].head(2))
print('-------------')
print(s[['Name','Age','Occupation']][s['Age']>s['Age'].mean()].loc[[True,True]])
print('------------')
print(s[['Name','Age','Occupation']][s['Age']>s['Age'].mean()].iloc[[0,2   ]])
